package com.nstar.model.helloworld;

import java.io.Serializable;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="DEPARTMENT"
 *     
*/
public class Department implements Serializable {

    /** identifier field */
    private String departId;

    /** nullable persistent field */
    private String departName;

    /** nullable persistent field */
    private String remark;

    /** persistent field */
    private Set userInfos;

    /** full constructor */
    public Department(String departId, String departName, String remark, Set userInfos) {
        this.departId = departId;
        this.departName = departName;
        this.remark = remark;
        this.userInfos = userInfos;
    }

    /** default constructor */
    public Department() {
    }

    /** minimal constructor */
    public Department(String departId, Set userInfos) {
        this.departId = departId;
        this.userInfos = userInfos;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="DEPART_ID"
     *         
     */
    public String getDepartId() {
        return this.departId;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    /** 
     *            @hibernate.property
     *             column="DEPART_NAME"
     *             length="50"
     *         
     */
    public String getDepartName() {
        return this.departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    /** 
     *            @hibernate.property
     *             column="REMARK"
     *             length="200"
     *         
     */
    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="DEPART_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.helloworld.UserInfo"
     *         
     */
    public Set getUserInfos() {
        return this.userInfos;
    }

    public void setUserInfos(Set userInfos) {
        this.userInfos = userInfos;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("departId", getDepartId())
            .toString();
    }

}
